﻿package com.lynn.salary.entity;

import java.util.Date;

public class User_ extends BaseEntity{

	public static final String ADMIN = "管理员";
	public static final String COMMON = "注册用户";
	
	public static final String FORBIDDEN = "禁用;";
	public static final String NORMAL = "正常;";
	public static final String RECOMMEND = "推荐用户;";
	public static final String TEMPORARY = "临时用户;";
	public static final String EXPIRED = "过期失效;";
	
	private String id;
	private String name;
	private String gender;// 性别
	private Date birthday;
	private String email;
	private String password;
	private String headImg;
	private Date registerTime;//注册时间
	
	private String province;//省份
	private String city;//城市
	
	private String mobilePhone;//手机
	private String qq;
	
	private String company;//单位
	private String phone;//电话
	private String address;//地址

	private String tag=NORMAL;// 帐号状态- 1-禁用 0- 正常
	
	private String type="common";//管理账户/普通账户  admin/common
	
	private String recommend;//推挤人

	/**
	 * 获取所有字段
	 * 
	 * @return
	 */
	public static String[] getFields() {

		return new String[] { "id", "name", "gender", "birthday","email",
				"password", "headImg","registerTime",
				"province","city","mobilePhone","qq",
				"company","phone","address",
				"tag","type","recommend" };
	}

	/**
	 * 获取表名
	 * 
	 * @return
	 */
	public static String getTableName() {

		return "user_";
	}

	/**
	 * 获取主键名字
	 * 
	 * @return
	 */
	public static String getPkName() {

		return "id";
	}

	public static Object[] getFk(String field) {
		if (field.equals("position")) {
			return new Object[] { SystemArgument.class, "code" };
		} else if (field.equals("headImg")) {
			return new Object[] { SystemFile.class, "id" };
		} else if(field.equals("recommend")) {
			return new Object [] {User_.class,"id"};
		}
		return null;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getHeadImg() {
		return headImg;
	}

	public void setHeadImg(String headImg) {
		this.headImg = headImg;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Date getRegisterTime() {
		return registerTime;
	}

	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getMobilePhone() {
		return mobilePhone;
	}

	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getRecommend() {
		return recommend;
	}

	public void setRecommend(String recommend) {
		this.recommend = recommend;
	}

}
